import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.InetAddress;
import java.net.Socket;

public class SocketClient {
    public static void main(String[] args) {

        Socket socket = null;

        try {
            socket = new Socket(InetAddress.getLocalHost(), 8090);
            InputStream inputStream = socket.getInputStream();
            InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
            BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
            String s = "";

            while ((s = bufferedReader.readLine()) != null){
                System.out.println(s);
            }

        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
